<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "user_money_record".
 *
 * @property int $id
 * @property int $user_id
 * @property double $money 金额
 * @property int $type (1: 入账  2: 出账)
 * @property int $order_id 返佣订单id
 * @property int $status 审核状态
 * @property int $created_at 创建时间
 * @property int $updated_at 更新时间
 */
class UserMoneyRecord extends Base
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'user_money_record';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['user_id', 'type', 'order_id', 'status', 'created_at', 'updated_at'], 'integer'],
            [['money'], 'number'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'user_id' => 'User ID',
            'money' => 'Money',
            'type' => 'Type',
            'order_id' => 'Order ID',
            'status' => 'Status',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
        ];
    }
}
